The goal of this notebook is to explore the impact of the upcoming sector expiration wave on April / May, especially when considering the ones with V1 proofs.
%load_ext autotime
%load_ext autoreload
%autoreload 2
time: 9.58 ms (started: 2021-08-12 15:06:49 +00:00)
# External dependences
import pandas as pd
import numpy as np
import plotly.express as px
from prophet import Prophet
import matplotlib.pyplot as plt
# Move path to parent folder
import sys
sys.path.insert(1, '../')
import plotly
plotly.offline.init_notebook_mode()
time: 886 ms (started: 2021-08-12 15:06:49 +00:00)
# Create a connection object from a conn string
from filecoin_metrics.connection import get_connection, get_connection_string
conn_string = get_connection_string('../config/sentinel-conn-string.txt')
connection = get_connection(conn_string)
time: 1.47 s (started: 2021-08-12 15:06:50 +00:00)
QUERY = """
/* Get the last state of the sectors */
with sector_states as (
select
msi.*,
max(msi.height) over (partition by msi.sector_id, msi.miner_id) as max_height
from miner_sector_infos msi
where msi.activation_epoch > 0
and msi.expiration_epoch > msi.height /* Get only active sectors */
order by max_height
)
select
count(*) as sector_count,
sum(ss.initial_pledge::numeric) / 1e18 as initial_pledge_in_fil,
count(*) * 32 as network_power_in_gb,
date_trunc('DAY', to_timestamp(height_to_unix(ss.activation_epoch))) as activation_date,
date_trunc('DAY', to_timestamp(height_to_unix(ss.expiration_epoch))) as expiration_date
from sector_states as ss
where ss.max_height = ss.height /* get the last state of the info */
group by activation_date, expiration_date
order by activation_date, expiration_date
"""
query_df = (pd.read_sql(QUERY, connection)
.assign(network_power_in_pib=lambda df: df.network_power_in_gb / (1024 ** 2))
.assign(initial_pledge_in_thousand_fil=lambda df: df.initial_pledge_in_fil / 1000))
time: 4min 24s (started: 2021-08-12 15:06:52 +00:00)
# Maximum date for V1 sectors
UPGRADE_DATE = '2020-11-25 00:00:00'
metrics = {'is_v1': lambda x: x['activation_date'] < UPGRADE_DATE}
query_df = query_df.assign(**metrics)
time: 17.3 ms (started: 2021-08-12 15:11:17 +00:00)
def resample_and_bar_plot(df, resample_rule, time_column, value_column, title, **kwargs):
fig_df = df.resample(resample_rule, on=time_column, label='left').sum()
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
title=title,
**kwargs)
return fig
def resample_and_bar_plot_relative(df, resample_rule, time_column, value_column, title, **kwargs):
fig_df = df.resample(resample_rule, on=time_column, label='left').sum()
y = fig_df.groupby(time_column).sum()
fig_df /= y
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
title=title,
**kwargs)
return fig
time: 16 ms (started: 2021-08-12 15:11:17 +00:00)
df = query_df.copy()
print("Basic stats")
print("---")
print(f"Total sectors (#): {df.sector_count.sum()}")
print(f"Raw bytes power (PiB): {df.network_power_in_gb.sum() / (1024 ** 2) :.3g}")
print(f"Initial pledge (FIL): {df.initial_pledge_in_fil.sum()}")
print("---")
Basic stats --- Total sectors (#): 73156149 Raw bytes power (PiB): 2.23e+03 Initial pledge (FIL): 22000392.535066683 --- time: 15.6 ms (started: 2021-08-12 15:11:17 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'sector_count'
title = 'Count of Expiring Sectors (#)'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
)
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
color='is_v1',
title=title)
fig.show()
time: 337 ms (started: 2021-08-12 15:11:17 +00:00)
resample_rule = '1d'
time_column = 'expiration_date'
value_column = 'sector_count'
title = 'Count of Expiring Sectors Before 15Jun2021 (log #)'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.query("expiration_date < '2021-06-15 00:00+00:00'")
.groupby(groups)
.sum()
.reset_index()
)
if fig_df.empty:
print('WARNING: DataFrame is Empty')
else:
fig = px.bar(fig_df,
x=time_column,
y=value_column,
facet_row=fig_df.is_v1,
title=title,
log_y=True)
fig.show()
WARNING: DataFrame is Empty time: 27.4 ms (started: 2021-08-12 15:11:17 +00:00)
sector_count = df.sector_count.sum()
v1_count = df.query("is_v1 == True").sector_count.sum()
v1_6mo_count = (df.query("is_v1 == True & expiration_date < '2021-06-01 00:00+00:00'")
.sector_count
.sum())
v1_12mo_count = (df.query("is_v1 == True & expiration_date < '2021-12-01 00:00+00:00' & expiration_date >= '2021-06-01 00:00+00:00'")
.sector_count
.sum())
v1_18mo_count = (df.query("is_v1 == True & expiration_date < '2022-06-01 00:00+00:00' & expiration_date >= '2021-12-01 00:00+00:00'")
.sector_count
.sum())
print("---")
print(f"Total sectors (#): {sector_count}")
print(f"V1 sectors (#): {v1_count}")
print(f"V1 sectors share (%): {v1_count / sector_count :.1%}")
print("---")
print(f"6mo V1 sectors share (%) of total sectors: {v1_6mo_count / sector_count :.2%}")
print(f"12mo V1 sectors share (%) of total sectors: {v1_12mo_count / sector_count :.2%}")
print(f"18mo V1 sectors share (%) of total sectors: {v1_18mo_count / sector_count :.2%}")
print("---")
print(f"6mo V1 sectors share (%) of total sectors: {v1_6mo_count / v1_count :.2%}")
print(f"12mo V1 sectors share (%) of total sectors: {v1_12mo_count / v1_count :.2%}")
print(f"18mo V1 sectors share (%) of total sectors: {v1_18mo_count / v1_count :.2%}")
print("---")
--- Total sectors (#): 73156149 V1 sectors (#): 1189468 V1 sectors share (%): 1.6% --- 6mo V1 sectors share (%) of total sectors: 0.00% 12mo V1 sectors share (%) of total sectors: 0.00% 18mo V1 sectors share (%) of total sectors: 1.63% --- 6mo V1 sectors share (%) of total sectors: 0.00% 12mo V1 sectors share (%) of total sectors: 0.00% 18mo V1 sectors share (%) of total sectors: 100.00% --- time: 34.3 ms (started: 2021-08-12 15:11:17 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'sector_count'
title = 'Upcoming Sector Expiration Count, grouped by sector version (#)'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
.reset_index()
)
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
facet_row='is_v1',
title=title)
fig.show()
time: 104 ms (started: 2021-08-12 15:11:17 +00:00)
resample_rule = '1w'
time_column = 'activation_date'
value_column = 'sector_count'
title = 'Activated Sector Count, grouped by sector version (#)'
groups = [pd.Grouper(key='activation_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
.reset_index()
)
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
facet_row='is_v1',
title=title)
fig.show()
time: 107 ms (started: 2021-08-12 15:11:17 +00:00)
rename_cols = {'activation_date': 'ds',
'sector_count': 'y'}
proj_df = (df.resample("1d", on="activation_date")
.sector_count
.sum()
.reset_index()
.rename(columns=rename_cols)
.assign(ds=lambda df: df.ds.dt.tz_localize(None))
.assign(y=lambda df: df.y.cumsum() / (32 * 1024 * 1024)))
m = Prophet(changepoint_prior_scale=0.4)
m.fit(proj_df)
future = m.make_future_dataframe(periods=60)
forecast = m.predict(future)
fig = m.plot(forecast, figsize=(10, 4))
plt.title('Past and Forecasted RB Storage Power')
plt.xlabel("Time")
plt.ylabel("Total RB Storage Power (EiB)")
plt.show()
INFO:prophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this. INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Initial log joint probability = -35.0297
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
99 1086.56 0.0292297 1282.13 1 1 122
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
199 1183.01 0.0069328 377.733 1 1 236
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
299 1212.75 0.00199629 104.729 0.2338 1 352
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
399 1220.62 0.00136294 129.752 1 1 461
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
499 1233.56 0.00607426 618.034 1 1 571
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
599 1241.13 0.0105528 313.415 1 1 693
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
699 1248.06 0.000224052 45.1991 0.8022 0.8022 809
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
799 1249.22 0.00624081 154.738 1 1 929
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
899 1250.14 0.00431049 94.3784 0.6392 0.6392 1041
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
999 1250.54 0.00147831 53.8892 1 1 1163
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1075 1250.66 6.14965e-06 12.3639 3.5e-07 0.001 1296 LS failed, Hessian reset
1099 1250.75 0.000431175 27.7571 0.6377 0.6377 1327
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1199 1250.88 3.52055e-05 26.9327 1.571e-06 0.001 1501 LS failed, Hessian reset
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1299 1251.11 0.00781204 244.932 1 1 1618
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1399 1251.93 0.0041213 46.4634 0.6747 0.6747 1732
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1499 1252.25 0.000283805 32.4674 0.3988 0.3988 1852
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1599 1252.37 6.42656e-05 11.6967 1 1 1972
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1699 1252.47 0.000352422 12.3669 3.992 0.3992 2092
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1799 1252.55 2.14488e-05 14.5461 0.01143 1 2223
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1899 1252.56 7.52909e-05 16.8549 0.6063 0.6063 2354
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
1965 1252.78 2.09283e-05 33.9227 9.763e-07 0.001 2511 LS failed, Hessian reset
1999 1252.83 1.16949e-05 29.8056 0.02368 1 2552
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
2043 1252.85 7.09077e-06 14.1598 3.437e-07 0.001 2645 LS failed, Hessian reset
2070 1252.86 4.23508e-06 6.1592 2.568e-07 0.001 2722 LS failed, Hessian reset
2099 1252.86 0.000231838 13.0663 1 1 2759
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
2199 1252.88 1.07492e-05 8.20954 1 1 2893
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
2260 1252.88 1.26457e-06 7.18272 0.3482 1 2967
Optimization terminated normally:
Convergence detected: relative gradient magnitude is below tolerance
time: 3.66 s (started: 2021-08-12 15:11:17 +00:00)
rename_cols = {'activation_date': 'ds',
'sector_count': 'y'}
proj_df = (df.query("activation_date > '2020-11-01 00:00+00:00'")
.resample("1d", on="activation_date")
.sector_count
.sum()
.reset_index()
.rename(columns=rename_cols)
.assign(ds=lambda df: df.ds.dt.tz_localize(None)))
m = Prophet(changepoint_prior_scale=0.2)
m.fit(proj_df)
future = m.make_future_dataframe(periods=60)
forecast = m.predict(future)
fig = m.plot(forecast, figsize=(10, 4))
plt.title('Past and Forecasted Daily New Sectors')
plt.xlabel("Time")
plt.ylabel("Daily New Sectors (#)")
plt.show()
INFO:prophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this. INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Initial log joint probability = -10.1148
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
99 539.511 0.061665 53.5025 1 1 125
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
199 548.652 0.0114822 39.2769 1 1 249
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
299 549.68 0.000879443 20.8058 0.5639 0.5639 371
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
399 549.984 0.00094087 19.9121 0.5233 0.5233 505
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
420 550.436 0.000545565 39.5618 2.213e-05 0.001 563 LS failed, Hessian reset
499 550.653 0.000274347 14.4428 1 1 670
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
562 550.687 0.000192481 22.5034 9.966e-06 0.001 773 LS failed, Hessian reset
599 550.694 1.80431e-05 22.0015 1 1 817
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
617 550.695 4.16559e-06 17.1881 2.284e-07 0.001 883 LS failed, Hessian reset
659 550.696 5.62066e-08 17.6953 0.1049 0.1049 938
Optimization terminated normally:
Convergence detected: relative gradient magnitude is below tolerance
time: 2.17 s (started: 2021-08-12 15:11:21 +00:00)
rename_cols = {'activation_date': 'ds',
'sector_count': 'y'}
proj_df = (df.query("activation_date > '2020-11-01 00:00+00:00' & activation_date < '2021-03-01 00:00+00:00'")
.resample("1d", on="activation_date")
.sector_count
.sum()
.reset_index()
.rename(columns=rename_cols)
.assign(ds=lambda df: df.ds.dt.tz_localize(None)))
m = Prophet(changepoint_prior_scale=0.2)
m.fit(proj_df)
future = m.make_future_dataframe(periods=90)
forecast = m.predict(future)
fig = m.plot(forecast, figsize=(10, 4))
plt.title('Past and Forecasted Daily New Sectors without March data')
plt.xlabel("Time")
plt.ylabel("Daily New Sectors (#)")
plt.show()
INFO:prophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this. INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Initial log joint probability = -4.476
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
72 151.528 0.00255944 21.4481 7.658e-05 0.001 120 LS failed, Hessian reset
99 151.713 0.000149277 17.1013 2.201 0.2201 163
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
144 151.717 0.000179243 13.4875 8.639e-06 0.001 264 LS failed, Hessian reset
199 151.718 9.43985e-06 17.6273 1 1 342
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
226 151.733 5.13839e-05 17.9329 3.145e-06 0.001 416 LS failed, Hessian reset
252 151.733 9.53697e-09 15.6199 0.06896 0.06896 461
Optimization terminated normally:
Convergence detected: absolute parameter change was below tolerance
time: 2.2 s (started: 2021-08-12 15:11:23 +00:00)
rename_cols = {'activation_date': 'ds',
0: 'y'}
proj_df = (df.query("activation_date > '2020-11-01 00:00+00:00'")
.resample("1d", on="activation_date")
.apply(lambda x: (x.initial_pledge_in_fil / x.sector_count).mean())
.reset_index()
.rename(columns=rename_cols)
.assign(ds=lambda df: df.ds.dt.tz_localize(None))
)
m = Prophet(changepoint_prior_scale=0.2)
m.fit(proj_df)
future = m.make_future_dataframe(periods=60)
forecast = m.predict(future)
fig = m.plot(forecast, figsize=(10, 4))
plt.title('Past and Forecasted Initial Pledge per Sector')
plt.xlabel("Time")
plt.ylabel("Mean Initial Pledge per Sector (FIL)")
plt.show()
INFO:prophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this. INFO:prophet:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Initial log joint probability = -5.28229
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
99 324.683 0.000123082 17.1488 0.168 0.168 130
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
199 325.566 0.000132078 14.9216 0.5334 0.5334 259
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
299 326.159 6.83387e-05 16.8753 3.783e-06 0.001 434 LS failed, Hessian reset
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
318 326.159 5.36507e-08 13.2791 0.2736 1 469
Optimization terminated normally:
Convergence detected: relative gradient magnitude is below tolerance
time: 2.27 s (started: 2021-08-12 15:11:25 +00:00)
m.fit
<bound method Prophet.fit of <prophet.forecaster.Prophet object at 0x7f84ae348940>>
time: 26.1 ms (started: 2021-08-12 15:11:28 +00:00)
resample_rule = '7d'
time_column = 'activation_date'
value_column = 'sector_count'
title = 'Count of Sector Activation Date (#)'
groups = [pd.Grouper(key='activation_date', freq=resample_rule),
pd.Grouper(key='expiration_date', freq=resample_rule)]
fig_df = df.groupby(groups).sum().reset_index()
px.density_heatmap(fig_df,
x='activation_date',
y='expiration_date',
z='sector_count')
time: 134 ms (started: 2021-08-12 15:11:28 +00:00)
resample_rule = '1d'
time_column = 'activation_date'
value_column = 'sector_count'
title = 'Count of Sector Activation Date (#)'
groups = [pd.Grouper(key='activation_date', freq=resample_rule),
pd.Grouper(key='expiration_date', freq=resample_rule)]
fig_df = df.groupby(groups).sum().reset_index()
fig = px.density_contour(fig_df,
x='activation_date',
y='expiration_date',
z='sector_count',
histfunc='sum')
fig.show()
time: 474 ms (started: 2021-08-12 15:11:28 +00:00)
sector_count = df.initial_pledge_in_fil.sum()
v1_count = df.query("is_v1 == True").initial_pledge_in_fil.sum()
v1_6mo_count = (df.query("is_v1 == True & expiration_date < '2021-06-01 00:00+00:00'")
.initial_pledge_in_fil
.sum())
v1_12mo_count = (df.query("is_v1 == True & expiration_date < '2021-12-01 00:00+00:00' & expiration_date >= '2021-06-01 00:00+00:00'")
.initial_pledge_in_fil
.sum())
v1_18mo_count = (df.query("is_v1 == True & expiration_date < '2022-06-01 00:00+00:00' & expiration_date >= '2021-12-01 00:00+00:00'")
.initial_pledge_in_fil
.sum())
print("---")
print(f"Total collateral (Million FIL): {sector_count / 1e6 :.3g}")
print(f"V1 collateral (Million FIL): {v1_count / 1e6 :.3g}")
print(f"V1 sectors share (%): {v1_count / sector_count :.1%}")
print("---")
print(f"6mo V1 sectors share (%) of total collateral: {v1_6mo_count / sector_count :.2%}")
print(f"12mo V1 sectors share (%) of total collateral: {v1_12mo_count / sector_count :.2%}")
print(f"18mo V1 sectors share (%) of total collateral: {v1_18mo_count / sector_count :.2%}")
print("---")
print(f"6mo V1 sectors share (%) of total collateral: {v1_6mo_count / v1_count :.2%}")
print(f"12mo V1 sectors share (%) of total collateral: {v1_12mo_count / v1_count :.2%}")
print(f"18mo V1 sectors share (%) of total collateral: {v1_18mo_count / v1_count :.2%}")
print("---")
--- Total collateral (Million FIL): 22 V1 collateral (Million FIL): 0.376 V1 sectors share (%): 1.7% --- 6mo V1 sectors share (%) of total collateral: 0.00% 12mo V1 sectors share (%) of total collateral: 0.00% 18mo V1 sectors share (%) of total collateral: 1.71% --- 6mo V1 sectors share (%) of total collateral: 0.00% 12mo V1 sectors share (%) of total collateral: 0.00% 18mo V1 sectors share (%) of total collateral: 100.00% --- time: 43.5 ms (started: 2021-08-12 15:11:28 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'initial_pledge_in_fil'
title = 'Initial Pledge (FIL) of Expiring Sectors (#)'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
)
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
color='is_v1',
title=title)
fig.show()
time: 179 ms (started: 2021-08-12 15:11:28 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'initial_pledge_in_fil'
title = 'Initial Pledge (FIL) of Expiring Sectors, grouped by Sector Version'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
.reset_index()
)
fig = px.bar(fig_df,
x=time_column,
y=value_column,
facet_col='is_v1',
title=title)
fig.show()
time: 105 ms (started: 2021-08-12 15:11:29 +00:00)
resample_rule = '1m'
time_column = 'activation_date'
value_column = ['initial_pledge_in_thousand_fil']
title = 'Sum of Initial Pledge (FIL) across activation dates'
resample_and_bar_plot(df, resample_rule, time_column, value_column, title).show()
time: 98.8 ms (started: 2021-08-12 15:11:29 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'network_power_in_pib'
title = 'RB Network Power (PiB) of Expiring Sectors (#)'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
)
fig = px.bar(fig_df.reset_index(),
x=time_column,
y=value_column,
color='is_v1',
title=title)
fig.show()
time: 88.4 ms (started: 2021-08-12 15:11:29 +00:00)
resample_rule = '1m'
time_column = 'expiration_date'
value_column = 'network_power_in_pib'
title = 'RB Network Power (PiB) of Expiring Sectors, grouped by Sector Version'
groups = [pd.Grouper(key='expiration_date', freq=resample_rule),
'is_v1']
fig_df = (df.groupby(groups)
.sum()
.reset_index()
)
fig = px.bar(fig_df,
x=time_column,
y=value_column,
facet_col='is_v1',
title=title)
fig.show()
time: 102 ms (started: 2021-08-12 15:11:29 +00:00)
resample_rule = '1m'
time_column = 'activation_date'
value_column = ['network_power_in_pib']
title = 'Sum of RB Network Power (PiB) across activation dates'
resample_and_bar_plot(df, resample_rule, time_column, value_column, title).show()
time: 80.8 ms (started: 2021-08-12 15:11:29 +00:00)